Developer Documentation

QuickTime 4 API Documentation

3D Graphics Programming with QuickDraw 3D 1.5.4

Previous | QD3D Book | Overview | Chapter Contents | Next |

About the 3D Viewer

The 3D Viewer (or, more briefly, the Viewer ) is a shared library that provides a very simple method for displaying 3D models, together with a set of controls that permit limited interaction with those models. Figure 6 shows an instance of the 3D Viewer displaying a sample three-dimensional model.

Figure 6 An instance of the 3D Viewer displaying three-dimensional data

An instance of the 3D Viewer is a viewer object. Every viewer object is typically associated with exactly one window, within which the viewer object must be entirely contained. The viewer object can occupy the entire content region of the window, or it can occupy some smaller portion of the window. Your application can create more than one viewer object; indeed, it can create more than one viewer object associated with a single window.

When a viewer object is first created and displayed to the user, it consists of a picture area that contains the displayed image and either a controller strip or a badge. The controller strip is a rectangular area at the bottom of the viewer object that contains one or more controls. (See the following section for a complete explanation of these controls.) A badge is a visual element that is displayed in the picture area when the controller strip is not visible. The user can click on the badge to make the controller strip appear.

The part of the window that contains the picture area and the controller strip (if present) is the viewer pane (or viewer frame ). In Figure 6 , the viewer pane entirely fills the window's content region. Alternatively, you can place the viewer pane in part of the window; you would do this to embed a 3D picture in a document window.

It's important to understand that the 3D Viewer is built on top of QuickDraw 3D, but you don't need to call any QuickDraw 3D functions to use the 3D Viewer. The 3D Viewer is a shared library that is separate from the QuickDraw 3D shared library. You can call Q3ViewerNew (and any other 3D Viewer functions) without having called Q3Initialize to initialize QuickDraw 3D. The models displayed by the Viewer must be structured according to the QuickDraw 3D Object Metafile specification, but the metafile data can be stored either in a file or in memory.

Controller Strips

Badges

Drag and Drop


© 1997 Apple Computer, Inc.

Previous | QD3D Book | Overview | Chapter Contents | Next |